package com.ssm.springboot.dao;

import com.ssm.springboot.pojo.Data;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author
 * @create 2018-05-25 16:25
 **/

@Mapper
public interface UserMapper {
    @Results(id = "userResult", value = {
            @Result(property = "name", column = "nick_name")
    })
    @Select("SELECT * FROM DATA WHERE AGE=#{age}")
    List<Data> getList(int age);
    @Insert("INSERT INTO `data` (`nick_name`, `age`) VALUES (#{name}, #{age})")
    void insert(Data data);

}
